<template>
  <div class="user-posts">
    <post v-for="postId in postIds" :key="postId" :id="postId" />
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import Post from '../../../views/components/post/index.vue'

const props = defineProps<{
  id: string
}>()

const postIds = ref<string[]>([])

onMounted(() => {
  // 模拟数据，实际项目中应该通过API获取用户的帖子ID列表
  postIds.value = ['1', '2', '3']
})
</script>

<style scoped lang="scss">
.user-posts {
  padding: 16px 0;
}
</style>
